﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EcoSystem
{
    /// <summary>
    /// 取号规则项定义
    /// </summary>
    [NotMapped]
    [Serializable]
    public class TakeRuleItem
    {
        /// <summary>
        /// 规则类型
        /// </summary>
        public TakeRuleType Type { get; set; }

        /// <summary>
        /// 
        /// </summary>
        public int SortIndex { get; set; }

        /// <summary>
        /// 规则项参数名
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 规则项说明
        /// </summary>
        public string DisplayName { get; set; }

        /// <summary>
        /// 长度
        /// </summary>
        public Nullable<int> Length { get; set; }

        /// <summary>
        /// 允许传入参数
        /// </summary>
        public bool AllowAfferent { get; set; }

        /// <summary>
        /// 起始流水号
        /// </summary>
        public Nullable<int> StartNumber { get; set; }

        /// <summary>
        /// 流水号分组规则索引
        /// </summary>
        public List<int> GroupRuleIndexes { get; set; }

        /// <summary>
        /// 随机值类型
        /// </summary>
        public Nullable<RandomValueType> RandomType { get; set; }

        /// <summary>
        /// 补位方式
        /// </summary>
        public Nullable<FillingMethod> FillingMethod { get; set; }

        /// <summary>
        /// 补位字符串
        /// </summary>
        public string FillingChar { get; set; }

        /// <summary>
        /// 参数取值方式
        /// </summary>
        public Nullable<TakingMethod> TakingMethod { get; set; }


        /// <summary>
        /// 参数键值索引
        /// </summary>
        public Nullable<int> TakeIndex { get; set; }

        /// <summary>
        /// 参数取值长度
        /// </summary>
        public Nullable<int> TakeLength { get; set; }

        /// <summary>
        /// 默认值
        /// </summary>
        public string DefaultValue { get; set; }
    }
}
